<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        const queue = []
        queue.push(1)
        queue.push(2)
        const item1 = queue.shift()
        const item2 = queue.shift()
    </script>
</body>
</html>